﻿Imports VN.INS.DL.DALC
Imports VN.INS.BL.BE
Public Class PPERBC
    ''' <summary>
    ''' Ejemplo de mapeo de Acceso a datos a Lógica de Negocios
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function ListaPPER(ByVal strPersona As String) As DataTable
        Dim objPPERDA As PPERDA
        Dim objDt As DataTable

        Try
            objPPERDA = New PPERDA
            objDt = objPPERDA.ListaPPER(strPersona)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function ListaUsuarioperfil(ByVal id As String, ByVal idname As String) As DataTable
        Dim objUsuarioDA As UsuarioDA
        Dim objDt As DataTable

        Try
            objUsuarioDA = New UsuarioDA
            objDt = objUsuarioDA.ListaUsuarioperfil(id, idname)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ListaPeriodo(ByVal tipo As String, ByVal ano As String) As DataTable
        Dim objUsuarioDA As PPERDA
        Dim objDt As DataTable

        Try
            objUsuarioDA = New PPERDA
            objDt = objUsuarioDA.ListaPeriodo(tipo, ano)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ListaTrabajos(ByVal struser As String, ByVal ano As String) As DataTable
        Dim objUsuarioDA As PPERDA
        Dim objDt As DataTable

        Try
            objUsuarioDA = New PPERDA
            objDt = objUsuarioDA.ListaTrabajos(struser, ano)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ListaTrabajos(ByVal struser As String, ByVal strMonitoreador As String, ByVal strPPER As String, ByVal strPeriodo As String, ByVal ano As String) As DataTable
        Dim objUsuarioDA As PPERDA
        Dim objDt As DataTable

        Try
            objUsuarioDA = New PPERDA
            objDt = objUsuarioDA.ListaTrabajos(struser, strMonitoreador, strPPER, strPeriodo, ano)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function ListaTrabajosEsp(ByVal strCodEsp As String, ByVal srtCodMonit As String, ByVal srtCodPper As String, ByVal srtCodPeriodo As String, ByVal srtCodAnhio As String) As DataTable
        Dim objUsuarioDA As PPERDA
        Dim objDt As DataTable

        Try
            objUsuarioDA = New PPERDA
            objDt = objUsuarioDA.ListaTrabajosEsp(strCodEsp, srtCodMonit, srtCodPper, srtCodPeriodo, srtCodAnhio)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function Lista_Planes_Trabajo_Estado(ByVal strPeriodo As String, ByVal srtCodAnhio As String) As DataTable
        Dim objUsuarioDA As PPERDA
        Dim objDt As DataTable

        Try
            objUsuarioDA = New PPERDA
            objDt = objUsuarioDA.Lista_Planes_Trabajo_Estado(strPeriodo, srtCodAnhio)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function


    Public Function ListaTabajosAdministrador(ByVal strMonitoreador As String, ByVal strPPER As String, ByVal strPeriodo As String, ByVal ano As String) As DataTable
        Dim objUsuarioDA As PPERDA
        Dim objDt As DataTable

        Try
            objUsuarioDA = New PPERDA
            objDt = objUsuarioDA.ListaTabajosAdministrador(strMonitoreador, strPPER, strPeriodo, ano)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function Jefe(ByVal strPersona As String) As DataTable
        Dim objPPERDA As PPERDA
        Dim objDt As DataTable
        Try
            objPPERDA = New PPERDA
            objDt = objPPERDA.Jefe(strPersona)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
End Class
